﻿using System.Collections.Generic;
using System.Net.Security;
using System.ServiceModel;
using DemoLib.Shared.Models;

namespace DemoLib.Shared.Contracts
{
    [ServiceContract(Namespace = "DemoService",
        ProtectionLevel = ProtectionLevel.None,
        SessionMode = SessionMode.Allowed)]
    public interface IInfoService
    {
        [OperationContract]
        IEnumerable<News> GetNews(int top = 10);

        [OperationContract]
        UserTask InsertNews(News news);

        [OperationContract]
        void UpdateNew(News news);

        [OperationContract]
        void DeleteNews(int id);

        [OperationContract]
        IEnumerable<UserTask> GetTasks(int top = 10);

        [OperationContract]
        UserTask InsertTask(UserTask task);

        [OperationContract]
        void UpdateTask(UserTask task);

        [OperationContract]
        void DeleteTask(int id);
    }
}